Identifying the Link Module(s) Associated With an Objects Links

Hi,

Is there an easy way (in DXL) to identify the name of the Link Module containing the link(s) for a particular object?

Basically, the objective is to process the objects in a module looking to see if they are requirements (attribute), and if it is a requirement, list the associated links (in or out - doing each separately) along with the name of the link module. Something like:

{Requirement Object in MySubComponent module} has outlink to {Requirement Object in MySystem module} using {NameOfLink module}

Back story:  This is an inherited activity to try to address traceability in a project that is not very well managed nor architected. Process discipline is lacking and DOORS features not fully utilized.  So we have a number of interrelated requirements modules tied together with default and user created link modules. Further complicating things is that while have database experience, I am a DOORS and DOORS DXL novice.

If someone knows of DXL code that already does  this, I would be interested in alink!

Thanks!

Don


Don-4251 - Wed Oct 08 12:59:40 EDT 2014

Re: Identifying the Link Module(s) Associated With an Objects Links
GregM_dxler - Fri Oct 10 09:17:34 EDT 2014

Maybe this will help.  This loop will get the link module name for each inlink. 

The complete code I made a number of years ago used an array and so had another routine to check if it was in the array and if not, add it to the array.  It would be better to make a skip list, save the link module name in there and then when done, you can print out all the link modules used.

Link l

Object o

string linkModName = "*"

Module m

string s

for l in (o)<- linkModName do {

   m = module(l)

   s = fullName m

   print "Full link module name: " s "\n"

}  

Probably need to fetch the link references in each object and open the source module first to get the link information.

Don't know if you can get the link module directly from the link reference.

Hope this helps,

Greg

Re: Identifying the Link Module(s) Associated With an Objects Links
llandale - Fri Oct 10 13:52:23 EDT 2014

GregM_dxler - Fri Oct 10 09:17:34 EDT 2014

Maybe this will help.  This loop will get the link module name for each inlink. 

The complete code I made a number of years ago used an array and so had another routine to check if it was in the array and if not, add it to the array.  It would be better to make a skip list, save the link module name in there and then when done, you can print out all the link modules used.

Link l

Object o

string linkModName = "*"

Module m

string s

for l in (o)<- linkModName do {

   m = module(l)

   s = fullName m

   print "Full link module name: " s "\n"

}  

Probably need to fetch the link references in each object and open the source module first to get the link information.

Don't know if you can get the link module directly from the link reference.

Hope this helps,

Greg

I see these commands in the doors.exe file; should be worth checking out:

  • ModuleVersion mvLink = linkVersion(LinkRef)
  • ModuleVersion mvLink = linkVersion(Link)
  • Module mLink = module(LinkRef)

Although its possible those come back null if the link module is not open.

-Louie

Re: Identifying the Link Module(s) Associated With an Objects Links
Don-4251 - Mon Oct 13 12:57:53 EDT 2014

llandale - Fri Oct 10 13:52:23 EDT 2014

I see these commands in the doors.exe file; should be worth checking out:

  • ModuleVersion mvLink = linkVersion(LinkRef)
  • ModuleVersion mvLink = linkVersion(Link)
  • Module mLink = module(LinkRef)

Although its possible those come back null if the link module is not open.

-Louie

Thanks Greg and Louie!  These are the type of hints I needed to move forward!

 

Don

Re: Identifying the Link Module(s) Associated With an Objects Links
Chris Annal - Wed Oct 15 13:39:14 EDT 2014

Hi Don - I know this is a DXL forum and all the answers should describe the DXL scripting that could accomplish your goal...but have you tried running the Analysis Wizard two times? Once for ALL incoming DOORS links and once for ALL outgoing links. There is the option to display Link Module Name for all objects in the module that have any incoming or outgoing links and that may be all you need. Takes less than 5 minutes to run and you can save the results as a View so that everyone can see them - or export to a spreadsheet.

You could also use the built-in Tools-->Filter to filter on the attribute that determines whether an object is a requirement or not, to simplify your view so that it only contains requirements.